package com.sinocare.project.common.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * 检测者(用户/客户)表(SccPatient)表实体类
 *
 * @author makejava
 * @since 2021-12-20 19:03:14
 */
@Data
@SuppressWarnings("serial")
@TableName(value = "scc_patient")
public class SccPatient extends Model<SccPatient> {
    //主键、检测者id 123
    @TableId(value = "patient_id",type = IdType.AUTO)
    private Integer patientId;
    //检测者编号
    private String patientCode;
    //登录账号id
    private Integer userId;
    //客户编号
    private String custcmerCode;
    //姓名
    private String name;
    //联系电话(唯一)
    private String phone;
    //性别
    private Integer sex;
    //年龄
    private Integer age;
    //身份证号
    private String idCard;
    //体重
    private Double weight;
    //身高
    private Double height;
    //创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date createTime;
    //修改时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date updateTime;
    //最近检测时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8")
    private Date lastTestTime;
    //检测次数(默认0)
    private Integer countOfTest;
    //状态(0禁用1正常，默认1)
    private Integer status;


    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.patientId;
    }
}

